import { getSeeDoctorApi } from "../../utils/api";

const seeDoctorModule = {
  namespaced: true,
  state() {
    return {
      list: [],
    };
  },
  mutations: {
    getSeeDoctorList(state, payload) {
      // console.log(payload.data);
      state.list = [];
      // console.log(payload.data);
      state.list = payload.data;
      console.log("2", state.list);
    },
  },
  actions: {
    async getSeeDoctorList({ commit }, payload) {
      const res = await getSeeDoctorApi({ typeid: payload });
      // console.log('res',res.result);
      commit("getSeeDoctorList", { data: res.result });
    },
  },
};

export default seeDoctorModule;
